package com.qf.qa.service.impl;

import com.qf.qa.entity.Answers;
import com.qf.qa.mapper.AnswersMapper;
import com.qf.qa.service.AnswersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author songfei
 * @Date 2021/10/7 16:46
 * @Version 1.0
 */
@Service
public class AnswersServiceImpl implements AnswersService {
    @Autowired
    private AnswersMapper answersMapper;
    @Override
    public void insert(Answers answers) {
        int i = answersMapper.insertSelective(answers);
        if(i!=1){
            System.out.println("添加答案失败");
            throw new RuntimeException("添加答案失败");
        }

    }
}
